<?php
$this->headLink()
        ->appendStylesheet($this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN . '/css/main.css')
        ->appendStylesheet($this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN . '/css/product.css');
?>
<?php $this->placeholder('slide')->captureStart() ?>
<div class="s-item">
    <div class="s-i-caption">
        <h3>Our Portfolio</h3>
        <p>Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text</p>
    </div>
    <div class="s-i-image">
        <img alt="" src="<?php echo $this->APP_STATIC_SERVER . '/skins/' . $this->APP_TEMPLATE . '/' . $this->APP_SKIN ?>/images/portfolio-banner.png"/>
    </div>
</div>
<?php $this->placeholder('slide')->captureEnd() ?>
<div id="main-outter">
    <?php echo $this->rWidget('category', 'templatecategories', array('featured' => null, 'start_depth' => null, 'end_depth' => 0))?>
    <div id="main">
        <div id="m-left">
            <?php
            /**
             * Add FB Likebox 
             */
            echo $this->rWidget(
                        'core', 
                        'fblikebox',
                        array(
                            'page_url' => 'href=http://www.facebook.com/idgitcomvn',
                            'color_scheme' => 'light',
                            'show_faces' => 'true',
                            'app_id' => '321661271228186',
                            'width' => 250,
                            'height' => 590
                        )
                    );
            ?>
            
        </div>
        <div id="m-right" class="product-category">
            <?php 
            $count = count($this->products);
            if($this->products && $count > 0){
                foreach($this->products as $product){
            ?>
            <div class="c-product">
                <div class="p-thumbnail">
                    <img src="<?php echo $product->image_thumbnail?>" alt=""/>
                </div>
                <div class="p-data">
                    <h3 class="p-name"><a href="<?php echo $this->url($product->getProperties(), 'product_product_details')?>"><?php echo $product->name?></a></h3>
                    <div class="p-description"><?php echo $product->description?></div>
                    <p class="p-date"><span><?php echo $this->translate('product_category_last_updated')?>:</span> <?php echo date('l, d F Y', ($product->modified_date) ? strtotime($product->modified_date) : strtotime($product->created_date))?></p>
                    <p class="p-views"><span>Hits: </span><?php echo $product->num_views?></p>
                    <div class="p-actions">
                        <a href="<?php echo $product->demo_url?>"><?php echo $this->translate('product_category_view_demo')?></a>
                        <?php
                        $attachs = json_decode(base64_decode($product->attachment));
                        ?>
                        <!--<a href="<?php //echo $this->url(array('id' => $product->id), 'product_product_download')?>"><?php echo $this->translate('product_category_download')?></a>-->
                        <a href="<?php echo $attachs[0]->url?>"><?php echo $this->translate('product_category_download')?></a>
                    </div>
                </div>
            </div>
            <?php
                }
            }?>
            <div class="clearfix"></div>
            <div id="pagination">
                <div id="paginator">
                    <?php echo $this->paginator()->slide($this->paginator, $this->paginatorOptions); ?>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>    
    </div>
    <div class="clearfix"></div>
</div>
<div class="clearfix"></div>
<?php echo $this->rWidget('news', 'featured', array('limit' => 4, 'category_id' => 59)); ?>
